/*
* Missing public definitions from Ntsecapi.h
*/


typedef enum _LSA_SID_NAME_MAPPING_OPERATION_TYPE {
	LsaSidNameMappingOperation_Add,
	LsaSidNameMappingOperation_Remove,
	LsaSidNameMappingOperation_AddMultiple,
} LSA_SID_NAME_MAPPING_OPERATION_TYPE, *PLSA_SID_NAME_MAPPING_OPERATION_TYPE;

typedef enum _LSA_SID_NAME_MAPPING_OPERATION_ERROR {
	LsaSidNameMappingOperation_Success,
	LsaSidNameMappingOperation_NonMappingError,
	LsaSidNameMappingOperation_NameCollision,
	LsaSidNameMappingOperation_SidCollision,
	LsaSidNameMappingOperation_DomainNotFound,
	LsaSidNameMappingOperation_DomainSidPrefixMismatch,
	LsaSidNameMappingOperation_MappingNotFound,
} LSA_SID_NAME_MAPPING_OPERATION_ERROR, *PLSA_SID_NAME_MAPPING_OPERATION_ERROR;

typedef struct _LSA_SID_NAME_MAPPING_OPERATION_ADD_INPUT {
	UNICODE_STRING      DomainName;
	UNICODE_STRING      AccountName;
	PSID		    Sid;
	ULONG               Flags;
} LSA_SID_NAME_MAPPING_OPERATION_ADD_INPUT, *PLSA_SID_NAME_MAPPING_OPERATION_ADD_INPUT;

typedef struct _LSA_SID_NAME_MAPPING_OPERATION_REMOVE_INPUT {
	UNICODE_STRING  DomainName;
	UNICODE_STRING  AccountName;
} LSA_SID_NAME_MAPPING_OPERATION_REMOVE_INPUT, *PLSA_SID_NAME_MAPPING_OPERATION_REMOVE_INPUT;

typedef union _LSA_SID_NAME_MAPPING_OPERATION_INPUT {
	LSA_SID_NAME_MAPPING_OPERATION_ADD_INPUT            AddInput;
	LSA_SID_NAME_MAPPING_OPERATION_REMOVE_INPUT         RemoveInput;
} LSA_SID_NAME_MAPPING_OPERATION_INPUT, *PLSA_SID_NAME_MAPPING_OPERATION_INPUT;

typedef struct _LSA_SID_NAME_MAPPING_OPERATION_GENERIC_OUTPUT {
	LSA_SID_NAME_MAPPING_OPERATION_ERROR    ErrorCode;
} LSA_SID_NAME_MAPPING_OPERATION_GENERIC_OUTPUT, *PLSA_SID_NAME_MAPPING_OPERATION_GENERIC_OUTPUT;

typedef LSA_SID_NAME_MAPPING_OPERATION_GENERIC_OUTPUT LSA_SID_NAME_MAPPING_OPERATION_ADD_OUTPUT, *PLSA_SID_NAME_MAPPING_OPERATION_ADD_OUTPUT;
typedef LSA_SID_NAME_MAPPING_OPERATION_GENERIC_OUTPUT LSA_SID_NAME_MAPPING_OPERATION_REMOVE_OUTPUT, *PLSA_SID_NAME_MAPPING_OPERATION_REMOVE_OUTPUT;

typedef union _LSA_SID_NAME_MAPPING_OPERATION_OUTPUT {
	LSA_SID_NAME_MAPPING_OPERATION_ADD_OUTPUT           AddOutput;
	LSA_SID_NAME_MAPPING_OPERATION_REMOVE_OUTPUT        RemoveOutput;
} LSA_SID_NAME_MAPPING_OPERATION_OUTPUT, *PLSA_SID_NAME_MAPPING_OPERATION_OUTPUT;

NTSTATUS WINAPI LsaManageSidNameMapping(
	LSA_SID_NAME_MAPPING_OPERATION_TYPE    OpType,
	PLSA_SID_NAME_MAPPING_OPERATION_INPUT  OpInput,
	PLSA_SID_NAME_MAPPING_OPERATION_OUTPUT *OpOutput
);
